package com.apple1.blogservices;

import com.apple1.blogentity.Article;
import com.apple1.blogentity.vo.ArticleVo;
import com.apple1.blogentity.vo.CommunityVo;

import java.util.List;

public interface CommunityService {

    int addCommunity(CommunityVo communityVo);

    int addCommunityUser(Integer user_id,Integer community_id);

    /**
     * 查询用户是否是圈子的管理员
     * @param user_id
     * @param community_id
     * @return
     */
    boolean isUserCommunityManager(Integer user_id,Integer community_id);

    int addCommunityManager(Integer user_id,Integer community_id);

    int delCommunity(Integer community_id);

    int delCommunityUser(Integer user_id,Integer community_id);

    int changeCommunityManager(Integer user_id,Integer community_id);

    int updateCommunity(Integer community_id,CommunityVo communityVo);

    CommunityVo selectCommunity(Integer community_id);

    List<ArticleVo> selectCommuintyUserArticles(Integer community_id);

    boolean isUserInCommunity(Integer user_id,Integer community_id);
}
